/* 编译
 * g++ CodingTraining/cpp/boolArray/boolArray.cpp -I. -DDEBUG -fexec-charset=GBK
 */
/* 输出
 * [Nnnut] CodingTraining/cpp/boolArray/boolArray.cpp:[0015] --- "0:0, 1:0, 2:0, 3:0, 4:0 ."
 * [Nnnut] CodingTraining/cpp/boolArray/boolArray.cpp:[0019] --- "0:1, 1:0, 2:0, 3:0, 4:0 ."
 */
/* 结论
 * bool的默认初始化值为false
 */
#include <iostream>
#include "CodingTraining/cpp/log/log.h"

using namespace std;

int main()
{
    const int MAX_LEN = 5;
    bool* pBool;

    pBool = new bool[MAX_LEN]{false};
    LOG("0:%d, 1:%d, 2:%d, 3:%d, 4:%d .", pBool[0], pBool[1], pBool[2], pBool[3], pBool[4]);
    delete pBool;

    pBool = new bool[MAX_LEN]{true};
    LOG("0:%d, 1:%d, 2:%d, 3:%d, 4:%d .", pBool[0], pBool[1], pBool[2], pBool[3], pBool[4]);
    delete pBool;

    return 0;
}